package cn.iocoder.yudao.module.agri.controller.admin.farmplan.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import javax.validation.constraints.*;
import org.springframework.format.annotation.DateTimeFormat;

import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;

/**
 * 种养批次 Base VO，提供给添加、修改、详细的子 VO 使用
 * 如果子 VO 存在差异的字段，请不要添加到这里，影响 Swagger 文档生成
 */
@Data
public class FarmPlanBaseVO {

    @Schema(description = "作物", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "作物不能为空")
    private String crop;

    @Schema(description = "面积", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "面积不能为空")
    private Integer areaSize;

    @Schema(description = "开始日期", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "开始日期不能为空")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime beginDate;

    @Schema(description = "预计产期")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime harvestDate;

    @Schema(description = "种养批次", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "种养批次不能为空")
    private String batchNo;

    @Schema(description = "种养模型")
    private Long farmModel;

    @Schema(description = "安全标准")
    private Integer standard;

    @Schema(description = "状态", example = "1")
    private Integer status;

}
